<template>
	<view class="order">
		<view class="zhan"></view>
		<!-- 用户信息 -->
		<sort-orderUser :user="user"></sort-orderUser>
		<!-- 订单详情 -->
		<sort-orderContent :list="list"></sort-orderContent>
		<!-- 信息 -->
		<view>
			<view class="all"><text class="one">商品金额:</text><text class="two">{{list.price}}<text class="three">{{list.danwei}}</text></text></view>
			<view class="all"><text class="one">合约周期:</text><text class="four">{{list.andWeek}}天</text></view>
		</view>
		<button type="default" @click="sureOreder">确认订单</button>
	</view>
</template>

<script>
	import user from '../../components/sort-orderUser/sort-orderUser.vue'
	import contents from '../../components/sort-orderContent/sort-orderContent.vue'
 	export default {
		components:{
			user,
			contents
		},
		data() {
			return {
				list:'',
				user:{
					img:'../../static/computingPower/shanqu.png',
					id:88888888
				}
			}
		},
		methods: {
			sureOreder(){
				uni.navigateTo({
					url:'../sign-payment/sign-payment?list='+JSON.stringify(this.list)
				})
			}
		},
		onLoad(res) {
			var list=JSON.parse(res.list)
			list.endWeek=list.endWeek.replace(list.endWeek[1],'+')
			this.list=list
			console.log(this.list);
		}
	}
</script>

<style scoped>
.order{
	height: 94.6vh;
	background-color: #F3F3F3;
}
.zhan{
	width: 100%;
	height: 20rpx;
}
.all{
	width: 84%;
	margin:20rpx auto;
	font-size: 1em;
}
.one{
	font-weight: bold;
	color: #6A6A6A;
}
.two{
	float: right;
	font-size: 1.3em;
	color: #FF0000;
}
.three{
	float: right;
	color: #959595;
	font-size: .8em !important;
	padding-top: 10rpx;
	padding-left: 10rpx;
}
.four{
	position: relative;
	left: 380rpx;
	font-weight: bold;
	color: #000000;
}
button{
	width: 86%;
	margin: auto;
	height: 80rpx;
	line-height: 80rpx;
	position: relative;
	top: 800rpx;
	color: #FFFFFF;
	background-color: #207DFE;
	}
	
</style>

